package servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Metier.I_Planning;
import Metier.Planning;


/**
 * Servlet implementation class BdDetailUS
 */
@WebServlet("/BdDetailUS")
public class BdDetailUS extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	private I_Planning planning;
	private PrintWriter out;
	public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
	{
		res.setContentType("text/html");
		try
		{
			out = res.getWriter();
			this.planning = new Planning();
			out.print(planning.detailUS(req.getParameter("id")));
			planning.close();
			planning = null;
		}
		catch(SQLException e)
		{
			out.print("SQLException: " + e.getMessage());
		} 
		out.close();
	}
}
